﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class provider_TravelInsurance_TravelInsurance : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.UserAgent.IndexOf("AppleWebKit") > 0)
        {
            Request.Browser.Adapters.Clear();
        }

        //if (Session[CE.Global.General.Guest] == null)
        //{
        //    Response.Redirect("~/Default.aspx");
        //}
        //else if (Session[CE.Global.General.Guest].ToString() == "Provider")
        //{
        //    if (Session[CE.Global.General.UserId] == null)
        //    {
        //        Response.Redirect("~/Provider/ProviderSecureLogin.aspx");
        //    }
        //}

        if (Session[CE.Global.General.ProviderCompanyId].ToString() == CE.Configuration.MyConfigurationManager.GetAppSettingValue("LibertyProviderCompanyId"))
        {
            imgLogo.ImageUrl = "~/Provider/images/logos/Liberty_insurance.gif";
            imgLogo.ToolTip = "Liberty Insurance";
            imgLogo.AlternateText = "Liberty Insurance";
            DateTime _dtLastLoginTime = Convert.ToDateTime(Session[CE.Global.General.LastLoginTime].ToString());
            divProviderInfo.InnerHtml = "Welcome " + Session[CE.Global.General.UserName].ToString() + ", Liberty Insurance Singapore<br /><span>Last login date : " + _dtLastLoginTime.ToShortDateString() + " " + _dtLastLoginTime.ToShortTimeString() + "</span>";

            litTitlePage.Text = "Liberty Insurance";

        }
        else if (Session[CE.Global.General.ProviderCompanyId].ToString() == CE.Configuration.MyConfigurationManager.GetAppSettingValue("EtiqaProviderCompanyId"))
        {
            imgLogo.ImageUrl = "~/Provider/images/logos/Etiqa.gif";
            imgLogo.ToolTip = "Etiqa Insurance";
            imgLogo.AlternateText = "Etiqa Insurance";
            DateTime _dtLastLoginTime = Convert.ToDateTime(Session[CE.Global.General.LastLoginTime].ToString());
            divProviderInfo.InnerHtml = "Welcome " + Session[CE.Global.General.UserName].ToString() + ", Etiqa Insurance Singapore<br /><span>Last login date : " + _dtLastLoginTime.ToShortDateString() + " " + _dtLastLoginTime.ToShortTimeString() + "</span>";

            litTitlePage.Text = "Etiqa Insurance";
        }
        else if (Session[CE.Global.General.ProviderCompanyId].ToString() == CE.Configuration.MyConfigurationManager.GetAppSettingValue("HSBCProviderCompanyId"))
        {
            imgLogo.ImageUrl = "~/Provider/images/logos/logo-hsbc.gif";
            imgLogo.ToolTip = "HSBC Insurance";
            imgLogo.AlternateText = "HSBC Insurance";

            DateTime _dtLastLoginTime = Convert.ToDateTime(Session[CE.Global.General.LastLoginTime].ToString());
            divProviderInfo.InnerHtml = "Welcome " + Session[CE.Global.General.UserName].ToString() + ", HSBC Insurance Singapore<br /><span>Last login date : " + _dtLastLoginTime.ToShortDateString() + " " + _dtLastLoginTime.ToShortTimeString() + "</span>";

            litTitlePage.Text = "HSBC Insurance";
        }
        else if (Session[CE.Global.General.ProviderCompanyId].ToString() == CE.Configuration.MyConfigurationManager.GetAppSettingValue("RSAProviderCompanyId"))
        {
            imgLogo.ImageUrl = "~/Provider/images/logos/rsa.gif";
            imgLogo.ToolTip = "RSA Insurance";
            imgLogo.AlternateText = "RSA Insurance";

            DateTime _dtLastLoginTime = Convert.ToDateTime(Session[CE.Global.General.LastLoginTime].ToString());
            divProviderInfo.InnerHtml = "Welcome " + Session[CE.Global.General.UserName].ToString() + ", RSA Insurance Singapore<br /><span>Last login date : " + _dtLastLoginTime.ToShortDateString() + " " + _dtLastLoginTime.ToShortTimeString() + "</span>";

            litTitlePage.Text = "RSA Insurance";
        }
        else if (Session[CE.Global.General.ProviderCompanyId].ToString() == CE.Configuration.MyConfigurationManager.GetAppSettingValue("ChartisProviderCompanyId"))
        {
            imgLogo.ImageUrl = "~/Provider/images/logos/chartis.gif";
            imgLogo.ToolTip = "Chartis Insurance";
            imgLogo.AlternateText = "Chartis Insurance";

            DateTime _dtLastLoginTime = Convert.ToDateTime(Session[CE.Global.General.LastLoginTime].ToString());
            divProviderInfo.InnerHtml = "Welcome " + Session[CE.Global.General.UserName].ToString() + ", Chartis Insurance Singapore<br /><span>Last login date : " + _dtLastLoginTime.ToShortDateString() + " " + _dtLastLoginTime.ToShortTimeString() + "</span>";

            litTitlePage.Text = "Chartis Insurance";
        }
        else if (Session[CE.Global.General.ProviderCompanyId].ToString() == CE.Configuration.MyConfigurationManager.GetAppSettingValue("ChinaProviderCompanyId"))
        {
            imgLogo.ImageUrl = "~/Provider/images/logos/china.gif";
            imgLogo.ToolTip = "China Taiping Insurance";
            imgLogo.AlternateText = "China Taiping Insurance";

            DateTime _dtLastLoginTime = Convert.ToDateTime(Session[CE.Global.General.LastLoginTime].ToString());
            divProviderInfo.InnerHtml = "Welcome " + Session[CE.Global.General.UserName].ToString() + ", China Taiping Insurance Singapore<br /><span>Last login date : " + _dtLastLoginTime.ToShortDateString() + " " + _dtLastLoginTime.ToShortTimeString() + "</span>";

            litTitlePage.Text = "China Taiping Insurance";
        }
        else if (Session[CE.Global.General.ProviderCompanyId].ToString() == CE.Configuration.MyConfigurationManager.GetAppSettingValue("EQProviderCompanyId"))
        {
            imgLogo.ImageUrl = "~/Provider/images/logos/eq.gif";
            imgLogo.ToolTip = "EQ Insurance";
            imgLogo.AlternateText = "EQ Insurance";

            DateTime _dtLastLoginTime = Convert.ToDateTime(Session[CE.Global.General.LastLoginTime].ToString());
            divProviderInfo.InnerHtml = "Welcome " + Session[CE.Global.General.UserName].ToString() + ", EQ Insurance Singapore<br /><span>Last login date : " + _dtLastLoginTime.ToShortDateString() + " " + _dtLastLoginTime.ToShortTimeString() + "</span>";

            litTitlePage.Text = "EQ Insurance";
        }
        else if (Session[CE.Global.General.ProviderCompanyId].ToString() == CE.Configuration.MyConfigurationManager.GetAppSettingValue("ACEProviderCompanyId"))
        {
            imgLogo.ImageUrl = "~/Provider/images/logos/ace.gif";
            imgLogo.ToolTip = "ACE Insurance";
            imgLogo.AlternateText = "ACE Insurance";

            DateTime _dtLastLoginTime = Convert.ToDateTime(Session[CE.Global.General.LastLoginTime].ToString());
            divProviderInfo.InnerHtml = "Welcome " + Session[CE.Global.General.UserName].ToString() + ", ACE Insurance Singapore<br /><span>Last login date : " + _dtLastLoginTime.ToShortDateString() + " " + _dtLastLoginTime.ToShortTimeString() + "</span>";

            litTitlePage.Text = "ACE Insurance";
        }
        else if (Session[CE.Global.General.ProviderCompanyId].ToString() == CE.Configuration.MyConfigurationManager.GetAppSettingValue("1CoverProviderCompanyId"))
        {
            imgLogo.ImageUrl = "~/Provider/images/logos/1cover.gif";
            imgLogo.ToolTip = "1Cover Insurance";
            imgLogo.AlternateText = "1Cover Insurance";

            DateTime _dtLastLoginTime = Convert.ToDateTime(Session[CE.Global.General.LastLoginTime].ToString());
            divProviderInfo.InnerHtml = "Welcome " + Session[CE.Global.General.UserName].ToString() + ", 1Cover Insurance Singapore<br /><span>Last login date : " + _dtLastLoginTime.ToShortDateString() + " " + _dtLastLoginTime.ToShortTimeString() + "</span>";

            litTitlePage.Text = "1Cover Insurance";
        }
        else if (Session[CE.Global.General.ProviderCompanyId].ToString() == CE.Configuration.MyConfigurationManager.GetAppSettingValue("DAProviderCompanyId"))
        {
            imgLogo.ImageUrl = "~/Provider/images/logos/directasia.gif";
            imgLogo.ToolTip = "DirectAsia Insurance";
            imgLogo.AlternateText = "DirectAsia Insurance";

            DateTime _dtLastLoginTime = Convert.ToDateTime(Session[CE.Global.General.LastLoginTime].ToString());
            divProviderInfo.InnerHtml = "Welcome " + Session[CE.Global.General.UserName].ToString() + ", DirectAsia Insurance Singapore<br /><span>Last login date : " + _dtLastLoginTime.ToShortDateString() + " " + _dtLastLoginTime.ToShortTimeString() + "</span>";

            litTitlePage.Text = "DirectAsia Insurance";
        }
    }
}
